<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
    <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<style type="text/css">
	    @charset "UTF-8";
	
		[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide {
		    display: none !important;
		}
		
		ng\:form {
		    display: block;
		}
		
		.ng-animate-block-transitions {
		    transition: 0s all!important;
		    -webkit-transition: 0s all!important;
		}
		
		.ng-hide-add-active,.ng-hide-remove {
		    display: block!important;
		}
	</style>
	<meta name="renderer" content="webkit">
	<title ng-bind="SEO.title" class="ng-binding">记得回来点单哦！ - 饿了么</title>
	<meta name="format-detection" content="telephone=no, email=no">
	<meta name="application-name" content="饿了么网上订餐">
	<meta name="msapplication-tooltip" content="饿了么网上订餐">
	<meta name="msapplication-starturl" content="./">
	<meta name="msapplication-tileimage" content="=http://static11.elemecdn.com/apple-touch-icon.png?v=2">
	<meta name="msapplication-tilecolor" content="#0088ff">
	<meta name="msapplication-task" content="name=切换地区;action-uri=http://ele.me/home;icon-uri=http://static11.elemecdn.com/apple-touch-icon.png?v=2">
	<meta name="msapplication-task" content="name=我要订餐;action-uri=http://ele.me?from=IE;icon-uri=http://static11.elemecdn.com/apple-touch-icon.png?v=2">
	<meta name="msapplication-task" content="name=订单中心;action-uri=http://ele.me/profile?from=IE;icon-uri=http://static11.elemecdn.com/apple-touch-icon.png?v=2">
	<meta name="msapplication-task" content="name=寻求帮助（HELP）;action-uri=http://ele.me/support?from=IE;icon-uri=http://static11.elemecdn.com/apple-touch-icon.png?v=2">
	<meta property="qc:admins" content="2263606250655">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	
	<link href="<%=basePath%>res/wzw/food/vendor.css" rel="stylesheet">
	<link href="<%=basePath%>res/wzw/food/main.css" rel="stylesheet">
	<script src="<%=basePath%>res/wzw/food/api" data-ref="API_CONFIG"></script>
	<script src="<%=basePath%>res/wzw/food/perf.js" type="text/javascript" crossorigin="anonymous"></script>
	<script src="<%=basePath%>res/wzw/food/vendor.js" type="text/javascript" crossorigin="anonymous"></script>
	<script src="<%=basePath%>res/wzw/food/main.js" type="text/javascript" crossorigin="anonymous"></script>
	<!--<base href="/">-->
	<base href=".">
	<meta name="mobile-agent" content="format=html5;url=https://h5.ele.me/shop/#id=897488">
	<meta name="description" content="正粤粥铺（雨花亭店）位于长沙市雨花区新建西路113号(原21号）湘凯综合楼8栋103、104门面，主要美食有皮蛋瘦肉粥、水饺、青菜瘦肉粥、香蕉甩饼、蛋炒河粉等，了解更多美食外卖，上饿了么网上订餐">
	<meta name="keywords" content="正粤粥铺（雨花亭店）外卖，正粤粥铺（雨花亭店）菜单，正粤粥铺（雨花亭店）电话">
	<style>
    	.u-flyer {
			display: block;
			width: 50px;
			height: 50px;
			border-radius: 50px;
			position: fixed;
			z-index: 9999;
		}
    </style>
</head>

<body cute-title="" ng-class="{hidesidebar: layoutState &amp;&amp; layoutState.hideSidebar, smallbody: layoutState.smallBody, whitebody: layoutState.whiteBody}" class="hidesidebar" style="position: relative;">
     <input type="hidden" id="fodUser" value="${fodUser }">
    <!-- 第一个div开始 -->
    <div ng-switch="state.type" state="layoutState" class="ng-isolate-scope">
        <!-- ngSwitchWhen: checkout -->
        <!-- ngSwitchDefault:  -->
        <div ng-switch-default="" topbar-default="" state="state" class="ng-scope ng-isolate-scope">
            <header class="topbar shoptopbar" role="navigation" ng-class="{shoptopbar: state.type === &#39;shop&#39;}">
                <div class="container clearfix">
                    <h1><a href="https://www.ele.me/" hardjump="" class="topbar-logo icon-logo"><span>饿了么</span></a></h1><a href="https://www.ele.me/" hardjump="" class="topbar-item topbar-homepage" ng-class="{&#39;focus&#39;: $root.locationpath[0] === &#39;place&#39;}">首页</a>  <a href="https://www.ele.me/profile/order" hardjump="" class="topbar-item"
                    ng-class="{&#39;focus&#39;: $root.locationpath[1] === &#39;order&#39;}">我的订单</a>  <a href="https://h5.ele.me/service/cooperation/" target="_blank" class="topbar-item cooperation">加盟合作</a>  <a href="https://help.ele.me/pc/" target="_blank"
                    class="topbar-item cooperation">我的客服</a>
                    <nav class="topbar-nav"><a ng-href="//h5.ele.me/service/agreement/#HEAEDER_SHOW=1" hardjump="" class="topbar-nav-link" target="_blank" href="https://h5.ele.me/service/agreement/#HEAEDER_SHOW=1">规则中心</a>
                        <div class="topbar-nav-link"><i class="topbar-nav-icon icon-mobile"></i>手机应用
                            <div class="dropbox topbar-mobile-dropbox"><span>扫一扫, 手机订餐更方便</span> 
                                <img src="<%=basePath%>res/wzw/image/appqc.95e532.png" class="topbar-nav-qrcode" alt="扫一扫下载饿了么手机 App">
                            </div>
                        </div>
                       <div topbar-profilebox="">
                             <div class="topbar-profilebox">
                                 <!-- ngIf: $root.user.avatar && $root.topbarType !== 'checkout' --> <span class="topbar-profilebox-avatar icon-profile ng-hide" ng-show="!$root.user.username"></span>  <span ng-show="!$root.user.username" id="registLogin"><a ng-href="//h5.ele.me/login/#redirect=https%3A%2F%2Fwww.ele.me%2F" target="_blank" href="<%=basePath %>pages/yyf/login.jsp">登录/注册</a></span> 
                                 <span
                                 class="topbar-profilebox-wrapper" ng-show="$root.user.username" id="userName">
                                     <!-- ngIf: $root.topbarType === 'checkout' --> <span class="topbar-profilebox-username ng-binding">${fodUser }</span> 
                                     <!-- ngIf: $root.topbarType === 'checkout' -->
                                     <!-- ngIf: $root.topbarType !== 'checkout' --><span class="topbar-profilebox-btn icon-arrow-down ng-scope" ng-if="$root.topbarType !== 'checkout'"></span>
                                     <!-- end ngIf: $root.topbarType !== 'checkout' -->
                                     <div class="dropbox topbar-profilebox-dropbox"><a class="icon-profile" href="<%=basePath %>pages/tl/center.jsp" hardjump="">个人中心</a>  <a class="icon-star" href="https://www.ele.me/profile/favor" hardjump="">我的收藏</a>  <a class="icon-location" href="https://www.ele.me/profile/address"
                                         hardjump="">我的地址</a>  <a class="icon-setting" href="https://www.ele.me/profile/security" hardjump="">安全设置</a><a class="icon-logout" href="<%=basePath %>pages/hjt/wykd.jsp">我要开店</a>  <a class="icon-logout" href="<%=basePath %>loginandregist/exitLogin" ng-click="logout()">退出登录</a>
                                     </div>
                                     </span>
                             </div>
                         </div>
                    </nav>
                </div>
            </header>
        </div>
    </div>
    <!-- 第一个div结束 -->
    
    
    
	<!-- ngView:  -->
	<!-- 第二个div开始 ==最大的div -->
	<div ng-view="" role="main" class="ng-scope">
	    
	    <!-- 2-1div开始 -->
	    <div class="shopguide ng-isolate-scope" shop-guide="" data="shop" isdisabled="shop.disabled">
	        <div class="container" ng-show="shop" itemscope="" itemtype="http://schema.org/Restaurant">
	            <div class="shopguide-info">
	                <meta itemprop="url" content="https://www.ele.me/shop/897488">
	                <img ng-src="//fuss10.elemecdn.com/0/0b/f20369339c86e78d5bfed992f9ab8png.png?imageMogr2/thumbnail/95x95/format/webp/quality/85" alt="" itemprop="image" src="" id="merchantImage">
	                <div class="shopguide-info-wrapper">
	                    <div>
	                        <h1 title="正粤粥铺（雨花亭店）" ng-class="{hastip: shop.tip}" itemprop="name" class="ng-binding" id="merchantName"></h1>
	                        <!-- ngIf: shop.tip -->
	                        <a ng-href="/shop/897488/info" href="https://www.ele.me/shop/897488/info">
	                            <!-- ngIf: isJingHua -->
	                        </a>
	                    </div>
	                    <p class="shopguide-info-rate">
	                        <div class="starrating icon-star ng-isolate-scope" title="评分4.6分" rate-star="" rating="shop.rating"><span class="icon-star" ng-style="{ width: (rating * 20) + &#39;%&#39; }" style="width: 92%;"></span>
	                        </div>(<a ng-href="/shop/897488/rate" class="ng-binding" href="https://www.ele.me/shop/897488/rate">1915</a>)</p>
	                    <p>
	                        <!-- ngRepeat: flavor in shop.flavor -->
	                    </p>
	                </div>
	                <div class="shopguide-info-extra">
	                    <ul>
	                        <!-- ngIf: shopRatingScore -->
	                        <li class="shopguide-extra-item shopguide-extra-compete ng-scope" ng-if="shopRatingScore">
	                            <div itemscope="" itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating">
	                                <h2 class="color-stress ng-binding" itemprop="ratingValue">4.6</h2>
	                                <meta itemprop="bestRating" content="5">
	                                <meta itemprop="reviewCount" content="1915">
	                                <p>综合评价
	                                    <br><span class="color-mute ng-binding">高于周边商家</span> 
	                                    <!-- ngIf: shopRatingScore.compare_rating --><span class="color-stress ng-binding ng-scope" ng-if="shopRatingScore.compare_rating">54.1%</span>
	                                    <!-- end ngIf: shopRatingScore.compare_rating -->
	                                </p>
	                            </div>
	                            <div>
	                                <p>服务态度
	                                    <div class="starrating icon-star ng-isolate-scope" title="评分4.2分" rate-star="" rating="shopRatingScore.service_score"><span class="icon-star" ng-style="{ width: (rating * 20) + &#39;%&#39; }" style="width: 84.4772%;"></span>
	                                    </div> <span class="color-stress ng-binding">4.2分</span>
	                                </p>
	                                <p>菜品评价
	                                    <div class="starrating icon-star ng-isolate-scope" title="评分4.3分" rate-star="" rating="shopRatingScore.food_score"><span class="icon-star" ng-style="{ width: (rating * 20) + &#39;%&#39; }" style="width: 85.5843%;"></span>
	                                    </div> <span class="color-stress ng-binding">4.3分</span>
	                                </p>
	                            </div>
	                        </li>
	                        <!-- end ngIf: shopRatingScore -->
	                        <!-- ngIf: shop.description -->
	                        <li class="shopguide-extra-item address">
	                            <p itemscope="" itemprop="streetAddress" itemtype="http://schema.org/PostalAddress"><span class="label">商家地址：</span>  <span class="ng-binding" id="merchantSite"></span>
	                                <meta itemprop="telephone" content="">
	                            </p>
	                            <p><span class="label">营业时间：</span>  <span itemprop="openingHours" class="ng-binding">07:00-23:50</span>
	                            </p>
	                        </li>
	                        <li class="shopguide-extra-item">
	                            <p class="shopguide-extra-delivery">由<span class="ng-binding" id="ps"></span>提供配送服务</p>
	                        </li>
	                    </ul>
	                </div>
	            </div>
	            <div class="shopguide-server"><span ng-hide="shop.id == 656683" class=""><em>起送价</em> <em class="shopguide-server-value ng-binding">20元</em></span>  <span ng-hide="shop.id == 656683" class=""><em>配送费</em> <em class="shopguide-server-value ng-binding">配送费¥5.1</em> <!-- ngIf: shop.delivery_mode.description --></span> 
	                <span
	                ng-hide="shop.id == 656683" class=""><em>平均送达速度</em>  <em class="shopguide-server-value ng-binding">35分钟</em>
	                    </span>
	            </div>
	            <a class="shopguide-favor" href="javascript:" ng-click="favor()">
	                <!-- ngIf: isFavorShop -->
	                <!-- ngIf: !isFavorShop --><i ng-if="!isFavorShop" class="icon-favorite ng-scope"></i>
	                <!-- end ngIf: !isFavorShop -->
	                <!-- ngIf: isFavorShop -->
	                <!-- ngIf: !isFavorShop --><span ng-if="!isFavorShop" class="ng-scope">收藏</span>
	                <!-- end ngIf: !isFavorShop -->
	            </a>
	        </div>
	    </div>
	    <!-- 2-1div结束 -->
	    
	    <!-- 2-2div开始 -->
	    <div shop-nav="" data="shop" filter-data="shop.filter" display-type="shop.displayType" shop-action="shopAction" class="ng-scope ng-isolate-scope">
	        <div class="shopnav">
	            <div class="container clearfix">
	                <div class="shopnav-left"><a class="shopnav-tab active" href="<%=basePath%>pages/wzw/food/food.jsp" ng-class="{active: shop.tab === &#39;index&#39;}">所有商品</a> 
	                </div>
	            </div>
	        </div>
	    </div>
	    <!-- 2-2div结束 -->
	    
	    <!-- 2-3div开始 -->
	    <div class="shopmain clearfix container ng-scope">
	        <!-- ngIf: shopAction === 'menu' -->
	        <div ng-if="shopAction === &#39;menu&#39;" shop-menu="" shop-cache="shopCache" filter-data="shop.filter" display-type="shop.displayType" class="shopmenu ng-isolate-scope" perf-click="desktop/201">
	            <!-- 食品类型开始 -->
	            <div id="fodType" ng-show="!loading &amp;&amp; !searchEnv" class="shopmenu-nav ng-isolate-scope" sticky="" sticky-class="sticky" sticky-body-class="shopmenu-nav-sticky" sticky-fn="shopNavSticky" style="max-height: 720px;">
	                
	            </div>
	            <!-- 食品类型结束 -->
	            <div ng-show="!loading" class="shopmenu-main grid" ng-class="{grid: displayType === &#39;grid&#39;, list: displayType === &#39;list&#39;}" style="margin-top: 0px;">
	                <!-- ngIf: filterData === 'default' && !searchEnv -->
	                <!-- 食品操作开始 -->
	                <div ng-if="filterData === &#39;default&#39; &amp;&amp; !searchEnv" class="ng-scope">
	                    <!-- div 对齐开始 -->
	                    <div id="fodFood" class="shopmenu-list clearfix ng-scope" ng-repeat="category in categorys">
	                        <h3 class="shopmenu-title ng-binding">商品 <span class="shopmenu-des ng-binding">大家喜欢吃，才叫真好吃。</span></h3>
	                        <!-- ngRepeat: food in category.foods -->
	                    </div>
	                    <!-- div 对齐结束 -->
	                </div>
	                <!-- 食品操作结束 -->
	                <!-- 购物车操作 -->
	                <div shop-cart="" cart-link="cartLink" ng-hide="shopCache.id == 656683 || shopCache.disableCart" class="ng-isolate-scope">
	                    <div class="shop-cart">
	                        <div class="shop-cartbasket" id="shopbasket" style="top: -44px; height: auto;">
	                            <div shop-groupswitcher="" cart="shopCart" class="ng-isolate-scope">
	                                <div class="shop-grouphead single" ng-class="{ single: shopCart.vm.groups.length === 1 }">
	                                
	                                    <a href="javascript:" class="icon-cart-add ng-scope" ng-if="shopCart.vm.groups.length === 1" ng-click="addGroup()" tooltip="添加购物车"></a>
	                                    <div class="shop-grouphead-row">
	                                       	购物车 <a href="javascript:" ng-click="shopCart.clearGroup(shopCart.currentGroupIndex)" id="qk">[清空]</a>
	                                    </div>
	                                </div>
	                            </div>
	                            <div id="tops">
									
                           		</div>
	                            
	                        </div>
	                        <div class="shop-cartfooter" ng-click="shopCart.toggleCart()">
	                        	<span id="end" class="icon-cart shop-carticon"></span>
	                            <div class="shop-cartfooter-text extras ng-binding" ng-bind-html="shopCart.vm.picewiseText">配送费¥5元</div>
	                            <button id="iiii" class="shop-cartfooter-checkout ng-binding disabled" ng-class="{disabled: shopCart.vm.button.name !== &#39;CAN_ORDER&#39;}" ng-disabled="shopCart.vm.button.disabled" ng-bind="shopCart.vm.button.text" ng-click="checkout($event)"
	                            disabled="disabled"></button>
	                        </div>
	                        <div class="shop-carthelper-opener" ng-class="{show: shopCart.cartHelper.show}" ng-click="showCartHelper()"></div>
	                        <div class="shop-carthelper ng-isolate-scope" id="shophelper" shop-cart-helper="" group="shopCart.cartHelper.group" cart="shopCart">
	                            <div class="shopcarhelper-title clearfix"><span>凑一凑</span>  <em>轻松凑满起送价</em>  <a href="javascript:" ng-click="closeCartHelper()">[ 关闭 ]</a>
	                            </div>
	                            <div class="shopcarthelper-container ui-scrollbar-light">
	                            </div>
	                        </div>
	                        <div class="shop-flyitem"></div>
	                    </div>
	                </div>
	                <!-- 购物车操作结束 -->
	            </div>
	        </div>
	        <!-- 商家公告 -->
	        <!-- end ngIf: shopAction === 'menu' -->
	        <!-- ngIf: shopAction === 'rate' -->
	        <!-- ngIf: shopAction === 'info' -->
	        <div class="shopmain-right ng-isolate-scope" shop-bulletin="" data="shop">
	            <div class="shopbulletin">
	                <div class="shopbulletin-section">
	                    <h3 class="shopbulletin-section-title">商家公告</h3>
	                    <p class="shopbulletin-content ng-binding"></p>
	                    <div class="shopbulletin-delivery">
	                        <h4>配送说明：</h4>
	                        <p class="ng-binding">配送费¥5元</p>
	                    </div>
	                    <ul class="shopbulletin-supports">
	                        <!-- ngRepeat: support in shop.supports -->
	                    </ul><a href="javascript:" class="shopcomplaint" ng-click="testLogin()">举报商家</a>
	                </div>
	                <div class="dialog" role="dialog" dialog="complaintDialog" style="display: none;">
	                    <div class="dialog-close icon-close"></div>
	                    <div class="dialog-content" ng-transclude="">
	                        <h5 class="complaint-title ng-scope">举报商家</h5>
	                        <form ng-submit="complaint()" class="ng-scope ng-pristine ng-valid">
	                            <label class="complaint-field">
	                                <textarea class="shopcomplaint-textarea ng-pristine ng-valid" ng-model="complaintObj.text" rows="6" cols="40"></textarea>
	                            </label>
	                            <div class="complaint-field">
	                                <button type="submit" class="btn-primary">提交</button>
	                            </div>
	                        </form>
	                    </div>
	                </div>
	            </div>
	        </div>
	        <!-- 商家公告结束 -->
	    </div>
	    <!-- 2-3div结束 -->
	    
	    <!-- 右边固定框回到顶部 -->
	    <div class="sidetools" side-tools="">
	        <a href="<%=basePath%>pages/hjt/wykd.jsp" class="sidetools-item icon-visit-history" target="_blank" title="我要开店" tooltip="我要开店" tooltip-placement="left"></a>
	        <div class="sidetools-item icon-qrcode">
	            <img class="sidetools-qrcode" src="<%=basePath%>res/wzw/image/appqc.95e532.png" alt="扫描二维码免费下载手机App">
	        </div>
	        <a href="JavaScript:" class="sidetools-item icon-arrow-up" title="回到顶部" tooltip="回到顶部" tooltip-placement="left" ng-click="backToTop()"></a>
	    </div>
	    <!-- 右边固定框回到顶部结束 -->
	
	</div>
	<!-- 第二个div结束 ==最大的div -->
    
    <!-- 底部 -->
    <footer class="footer" role="contentinfo">
        <div class="container clearfix">
            <div class="footer-link">
                <h3 class="footer-link-title">用户帮助</h3><a class="footer-link-item" href="https://help.ele.me/pc/" target="_blank">我的客服</a>
            </div>
            <div class="footer-link">
                <h3 class="footer-link-title">商务合作</h3><a class="footer-link-item" href="https://kaidian.ele.me/" target="_blank">我要开店</a>  <a class="footer-link-item" href="https://www.ele.me/support/about/jiameng" target="_blank">加盟指南</a>  <a class="footer-link-item" href="https://www.ele.me/support/about/contact"
                target="_blank">市场合作</a>  <a class="footer-link-item" href="http://openapi.eleme.io/" target="_blank">开放平台</a>
            </div>
            <div class="footer-link">
                <h3 class="footer-link-title">关于我们</h3><a class="footer-link-item" href="https://www.ele.me/support/about" target="_blank">饿了么介绍</a>  <a class="footer-link-item" href="http://jobs.ele.me/" target="_blank">加入我们</a>  <a class="footer-link-item" href="https://www.ele.me/support/about/contact"
                target="_blank">联系我们</a>  <a class="footer-link-item" ng-href="//h5.ele.me/service/agreement/#HEAEDER_SHOW=1" target="_blank" href="https://h5.ele.me/service/agreement/#HEAEDER_SHOW=1">规则中心</a>
            </div>
            <div class="footer-contect">
                <div class="footer-contect-item">24小时客服热线 : <a class="inherit" href="tel:10105757">10105757</a>
                </div>
                <div class="footer-contect-item">关注我们 :
                    <div href="JavaScript:" class="icon-wechat" ubt-click="402">
                        <div class="dropbox dropbox-bottom footer-contect-dropbox" ubt-visit="402">
                            <img src="<%=basePath%>res/wzw/image/wexinqc100@2x.393ade.png" alt="微信号: elemeorder">
                            <p>微信号: elemeorder</p>
                            <p>饿了么网上订餐</p>
                        </div>
                    </div>
                    <a href="http://e.weibo.com/elemeorder" class="icon-weibo" target="_blank"></a>
                </div>
            </div>
            <div class="footer-mobile">
                <a href="https://h.ele.me/landing" target="_blank">
                    <img src="<%=basePath%>res/wzw/image/appqc.95e532.png" class="footer-mobile-icon" alt="扫一扫下载饿了么手机 App">
                </a>
                <div class="footer-mobile-content">
                    <h3>下载手机版</h3>
                    <p>扫一扫,手机订餐方便</p>
                </div>
            </div>
            <div class="footer-copyright serif">
                <h5 class="owner">所有方：上海拉扎斯信息科技有限公司</h5>
                <p>增值电信业务许可证 : <a href="http://www.shca.gov.cn/" target="_blank">沪B2-20150033</a> | <a href="http://www.miibeian.gov.cn/" target="_blank">沪ICP备 09007032</a> | <a href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&amp;entyId=20120305173227823"
                    target="_blank">上海工商行政管理</a> Copyright ©2008-2018 ele.me, All Rights Reserved.互联网药品信息服务资格证书 编号：（沪）-经营性-2016-0011</p>
            </div>
            <div class="footer-police container">
                <a href="http://www.zx110.org/picp/?sn=310100103568" rel="nofollow" target="_blank">
                    <img alt="已通过沪公网备案，备案号 310100103568" src="<%=basePath%>res/wzw/image/picp_bg.e373b3.jpg" height="30">
                </a>
            </div>
        </div>
    </footer>
    <script src="<%=basePath%>res/wzw/food/home"></script>
    <script type="text/javascript" src="res/wzw/js/jquery.min.1.6.4.js"></script>
	<script src="<%=basePath%>js/jquery-1.10.2.js"></script>

	<script>
	$(function(){
		//默认加载数据
	    var fodUser = $("#fodUser").val();
	    if(fodUser != ""){
	    	$("#registLogin").hide();
	    }else {
	    	$("#userName").hide();
	    }
	});
	
	  var url = "<%=basePath%>food/findAll.action";
	  var data={"sId":sessionStorage['sId']};
		$.post(url,data,function(mes){
			for(var i=0;i<mes.length;i++){
				$("#fodFood").append("<div class='shopmenu-food ng-isolate-scope' ng-class='{noimg: !food.image_path}' id='"+mes[i].foodId+"' ng-repeat='food in category.foods' shop-menu-item='' food='food' shop='shopCache'>"
			            +"<span class='col-1 ng-scope' ng-if='food.image_path'><a href='javascript:' ng-click='showInfo(food)'><img ng-src='//fuss10.elemecdn.com/a/1d/ec0c7a98e32f8805308158d7e84a2jpeg.jpeg?imageMogr2/thumbnail/100x100' alt='"+mes[i].foodName+"的图片' src='"+mes[i].imagePath+"'></a></span>"
			            +"<div class='col-2 shopmenu-food-main'>"
			            +"<h3 class='shopmenu-food-name ui-ellipsis ng-binding'>"+mes[i].foodName+"</h3>"
			            +"<p class='color-mute ui-ellipsis ng-binding' tooltip=' '></p>"
			            +"<p><div class='starrating icon-star ng-isolate-scope' title='评分4.1分' rate-star='' rating='food.rating'><span class='icon-star' ng-style='{ width: (rating * 20) + '%' }' style='width: 0%;'></span>"
			            +"</div> <span class='color-mute ng-binding'>(0)</span>  <span class='color-mute ng-binding'>月售"+mes[i].foodSell+"份</span></p>"
			            +"</div><span class='col-3 shopmenu-food-price color-stress ng-binding'>"+mes[i].foodPrice+"<small class='ng-binding'></small></span>"
			            +" <span class='col-4'><div shop-cartbutton='' food='food' ng-hide='shop.id == '' || shop.disableCart' class='ng-isolate-scope'><div ng-if='!menuFood.hasSpec' class='ng-scope'><input class='spid' type='hidden' value='"+mes[i].foodId+"' id='caiping'><input class='spjiage' type='hidden' value='"+mes[i].foodPrice+"'><button class='shop-cartbutton ng-binding ng-scope' ng-if='!cartItem.quantity &amp;&amp; menuFood.stock' onclick='flyerCar(this);'>加入购物车</button></div></div></span>"
			        	+"</div>")

			}
		},dataType="JSON");
		
		var url = "<%=basePath%>fodType/findAll.action";
		var data={"sId":sessionStorage['sId']};
		$.post(url,data,function(mes){
			for(var i=0;i<mes.length;i++){
				$("#fodType").append("<a href='javascript:' ng-repeat='category in categorys' ng-click='scrollToCategory(category)' ng-class='{active: currentCategory.id === category.id}' class='ng-binding ng-scope ' onclick='findByFodTypeId(this)' fodTypeId="+mes[i].typeId+">"+mes[i].typeName+"</a>")
			}
		},dataType="JSON");
			
		//根据店家ID查询店家信息
		var url = "<%=basePath%>merchant/findById";
		var data={"merchantId":sessionStorage['sId']};
		$.post(url,data,function(mes){
			$("#merchantImage").attr("src",mes.imagePath);
			$("#merchantImage").attr("alt",mes.merchantName+"(雨花亭店)");
			$("#merchantName").text(mes.merchantName);
			$("#merchantSite").text(mes.merchantSite);
			$("#ps").text(mes.merchantName+"(雨花亭店)");
		},dataType="JSON");
		
		function findByFodTypeId(obj){
			//alert($(obj).attr("fodTypeId"));
			var typeId = $(obj).attr("fodTypeId");
			var data = {"merchantId":sessionStorage['sId'],"typeId":typeId};
			var url = "<%=basePath%>food/findByMerchantIdAndTypeId";
			$("#fodFood").html("");
			$.post(url,data,function(mes){
				for(var i=0;i<mes.length;i++){
					$("#fodFood").append("<div class='shopmenu-food ng-isolate-scope' ng-class='{noimg: !food.image_path}' id='"+mes[i].foodId+"' ng-repeat='food in category.foods' shop-menu-item='' food='food' shop='shopCache'>"
				            +"<span class='col-1 ng-scope' ng-if='food.image_path'><a href='javascript:' ng-click='showInfo(food)'><img ng-src='//fuss10.elemecdn.com/a/1d/ec0c7a98e32f8805308158d7e84a2jpeg.jpeg?imageMogr2/thumbnail/100x100' alt='"+mes[i].foodName+"的图片' src='"+mes[i].imagePath+"'></a></span>"
				            +"<div class='col-2 shopmenu-food-main'>"
				            +"<h3 class='shopmenu-food-name ui-ellipsis ng-binding'>"+mes[i].foodName+"</h3>"
				            +"<p class='color-mute ui-ellipsis ng-binding' tooltip=' '></p>"
				            +"<p><div class='starrating icon-star ng-isolate-scope' title='评分4.1分' rate-star='' rating='food.rating'><span class='icon-star' ng-style='{ width: (rating * 20) + '%' }' style='width: 0%;'></span>"
				            +"</div> <span class='color-mute ng-binding'>(0)</span>  <span class='color-mute ng-binding'>月售"+mes[i].foodSell+"份</span></p>"
				            +"</div><span class='col-3 shopmenu-food-price color-stress ng-binding'>"+mes[i].foodPrice+"<small class='ng-binding'></small></span>"
				            +" <span class='col-4'><div shop-cartbutton='' food='food' ng-hide='shop.id == '' || shop.disableCart' class='ng-isolate-scope'><div ng-if='!menuFood.hasSpec' class='ng-scope'><input class='spid' type='hidden' value='"+mes[i].foodId+"' id='caiping'><input class='spjiage' type='hidden' value='"+mes[i].foodPrice+"'><button class='shop-cartbutton ng-binding ng-scope' ng-if='!cartItem.quantity &amp;&amp; menuFood.stock' onclick='flyerCar(this);'>加入购物车</button></div></div></span>"
				        	+"</div>")

				}
			},dataType="JSON");
		}
	</script>
	<script type="text/javascript" src="<%=basePath%>res/yw/js/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath%>res/yw/js/requestAnimationFrame.js"></script> 
	<script type="text/javascript" src="<%=basePath%>res/yw/js/fly.js"></script> 
    <script type="text/javascript">
    		window.onload=function(){
    			//进入商品页直接刷新
    			/* $('.shop-cartbutton').on('click', addProduct); */
    			//进入页面时直接进入根据店家id显示该用户在该点所加入到购物车的商品
    			findAlls();
    			setTotal();
    			//加入购物车按钮将商品信息加入到数据库中
    			<%-- $(".shop-cartbutton").click(function(){
    				var url = "<%=basePath%>fodCart/add.action";
    				var obj = $(this).parent().find(".spid").val();
    				var jiage=$(this).parent().find(".spjiage").val();
    			 	var data={"foodId":obj,"userId":1,"cartNum":1,"cartPrice":jiage};
    				$.post(url,data,function(mes){
    					//加入购物车后进入购物车小页面的显示方法
    					findAll();
    					//加入购物车后直接刷新该页面
    					location.href="<%=basePath%>pages/wzw/food/food.jsp";
    				},"JSON");
    			}) --%>
    		}
			//飞入购物车的特效
			function flyerCar(ev) {
				var event = window.event || ev;
				var obj = event.srcElement ? event.srcElement : event.target;  
				//飞入购物车的图片
				var offset = $('#end').offset(), flyer = $('<img class="u-flyer" src="<%=basePath%>res/yw/images/profile-80_1.jpg"/>');
				flyer.fly({
					start: {
						left: event.pageX,
						top: event.pageY-$(window).scrollTop()
					},
					end: {
						left: offset.left,
						top: offset.top-$(window).scrollTop(),
						width: 20,
						height: 20
					}
				});
				addCar(obj);
			}
			function addCar(ss){
				var url = "<%=basePath%>fodCart/findAllid.action"
				var obj = $(ss).parent().find(".spid").val();
				var data={foodId:obj};
				$.post(url,data,function(mes){
					if(mes==1){
						var url = "<%=basePath%>fodCart/cxsl.action"
						var obj = $(ss).parent().find(".spid").val();
						var data={foodId:obj};
						$.post(url,data,function(mes){
							var url = "<%=basePath%>fodCart/xgsl.action"
							var obj = $(ss).parent().find(".spid").val();
							var cartnum=mes+1;
							var data={"cartNum":cartnum,"foodId":obj};
							$.post(url,data,function(mes){
								findAll();
								top.location.reload();
							},"JSON");
						},"JSON");
					}
					if(mes==0){
						var url = "<%=basePath%>fodCart/add.action";
						var obj = $(ss).parent().find(".spid").val();
						var jiage=$(ss).parent().find(".spjiage").val();
						var id=${userId};
					 	var data={"foodId":obj,"userId":id,"cartNum":1,"cartPrice":jiage};
						$.post(url,data,function(mes){
							//加入购物车后进入购物车小页面的显示方法
							findAll();
							//加入购物车后直接刷新该页面
							top.location.reload();
						},"JSON");
					}
				},"JSON");
				<%-- var url = "<%=basePath%>fodCart/add.action";
				var obj = $(ss).parent().find(".spid").val();
				var jiage=$(ss).parent().find(".spjiage").val();
				var id=${userId};
			 	var data={"foodId":obj,"userId":id,"cartNum":1,"cartPrice":jiage};
				$.post(url,data,function(mes){
					//加入购物车后进入购物车小页面的显示方法
					findAll();
					//加入购物车后直接刷新该页面
					top.location.reload();
				},"JSON"); --%>
			}
			//当点击加入购物车后显示在购物车的方法
			function findAll(){
				var a=sessionStorage['sId'];
				var url = "<%=basePath%>fodCart/findAll.action?merchantId="+a+"";
				$.post(url, null, function(mes) {
					$("#tops").html("");
					var o=document.getElementById('shopbasket').offsetTop+document.body.scrollTop;//获得元素
					o=o-44;
					for(var i =0 ;i<mes.length;i++){
						$("#shopbasket").css("top",o+"px");
						$("#tops").append("<div ng-repeat='item in shopCart.vm.groups[shopCart.currentGroupIndex]' class='shop-cartbasket-tablerow ng-scope' entityid='685429830'>"
								+"<div class='cell itemname ng-binding' ng-bind='item.name'>"+mes[i].foodName+"</div>"
								+"<div class='cal'><div style='position:relative;right:60px;top:13px;' class='cell itemquantity'>"
								+"<button class='min'>-</button>"
								+"<input type='text' class='shuzi' value="+mes[i].cartNum+">"
								+"<input type='hidden' class='idd' value="+mes[i].cartId+">"
								+"<button class='add'>+</button>"
								+"<span style='position:relative;left:60px;'><span>¥</span><span class='price'>"+mes[i].cartPrice+"</span></span>"
								+"</div></div>"
								+"</div>");
					}
			    }, "json");
				suanfa();
			}
			//进入商品页面显示购物车根据店家id显示该用户在该点所加入到购物车的商品
			function findAlls(){
				var a=sessionStorage['sId'];
				var url = "<%=basePath%>fodCart/findAll.action?merchantId="+a+"";
				$.post(url, null, function(mes) {
					$("#tops").html("");
					var o=document.getElementById('shopbasket').offsetTop+document.body.scrollTop;//获得元素
					for(var i =0 ;i<mes.length;i++){
						o=o-44;
						$("#shopbasket").css("top",o+"px");
						$("#tops").append("<div ng-repeat='item in shopCart.vm.groups[shopCart.currentGroupIndex]' class='shop-cartbasket-tablerow ng-scope' entityid='685429830'>"
								+"<div class='cell itemname ng-binding' ng-bind='item.name'>"+mes[i].foodName+"</div>"
								+"<div class='cal'><div style='position:relative;right:60px;top:13px;' class='cell itemquantity'>"
								+"<button class='min'>-</button>"
								+"<input type='text' class='shuzi' value="+mes[i].cartNum+">"
								+"<input type='hidden' class='idd' value="+mes[i].cartId+">"
								+"<button class='add'>+</button>"
								+"<span style='position:relative;left:60px;'><span>¥</span><span class='price'>"+mes[i].cartPrice+"</span></span>"
								+"</div></div>"
								+"</div>");
					}
			    }, "json");
				suanfa();
			}
			function suanfa(){
				/* 如果在和后台做数据交互时，出现点击加减按钮的值无法传到后台的情况，可以用下面这种方式*/
				//按钮减
				$("body").on("click", ".min", function(m) {
					var obj = $(this).parent().find(".shuzi");
					var jiage=$(this).parent().find(".idd");
					if(obj.val() <= 1) {
					     shanchu();
					} else {
					     obj.val(parseInt(obj.val()) - 1);
					   	 //根据加减修改数据库购买的数量
					     var url = "<%=basePath%>fodCart/updates.action";
						 var onn = obj.val();
						 var jg=jiage.val();
					 	 var data={"cartNum":onn,"cartId":jg};
						 $.post(url,data,function(mes){
							findAll();
							top.location.reload();
						 },"JSON");
					}
					obj.change();
				 });
				//按钮加
				$("body").on("click", ".add", function(m) {
					var obj =$(this).parent().find(".shuzi");
					var jiage=$(this).parent().find(".idd");
					if(obj.val()>=500){
					    alert("亲!已经是食品一天最高的销售量啦!!!!");
					}else {
						obj.val(parseInt(obj.val()) + 1);
						//根据加减修改数据库购买的数量
						var url = "<%=basePath%>fodCart/updates.action";
						var onn = obj.val();
						var jg=jiage.val();
					 	var data={"cartNum":onn,"cartId":jg};
						$.post(url,data,function(mes){
							findAll();
							top.location.reload();
						},"JSON");
					}
					obj.change();
				});
			}
			//根据id删除购物车里的商品
			function shanchu() {
				$(".min").click(function(){
					var url = "<%=basePath%>fodCart/deletes.action";
					var obj = $(this).parent().find(".idd").val();
				 	var data={"cartId":obj};
					$.post(url,data,function(mes){
						top.location.reload();
					});
				})
			}
			//购物车金额计算
			function setTotal(){
				$("#iiii").html("<span>购物车是空的</span>");
				var a=sessionStorage['sId'];
				var url = "<%=basePath%>fodCart/findAlljg.action";
				var data={merchantId:a};
				$.post(url,data, function(mes) {
					if(mes<30){
						var a=30-mes;
						$("#iiii").html("<span>还差¥"+a+"元起送</span>");
					}else if(mes>=30){
						$("#iiii").html("<a href='<%=basePath %>pages/yw/dindan.jsp'><span>¥"+mes+"(结算)</span></a>");
					}
			    }, "json");
			}
			
			//清空所有数据
			$("#qk").click(function(){
				var a=sessionStorage['sId'];
				var url = "<%=basePath%>fodCart/deletess.action";
				var obj = $(this).parent().find(".spid").val();
			 	var data={"merchantId":a,"foodId":obj};
				$.post(url,data,function(mes){
					top.location.reload();
				});
			})
	</script>
</body>
</html>